package Lambda.Consumer;


import java.util.function.Consumer;

//Consumer:用于消费一个信息：
// void accept(T t);
public class Consumerdemo4 {
    public static void shop(String s, Consumer<String> c){
        c.accept(s);
    }

    public static void main(String[] args) {
        String d="赵丽颖";
        shop(d,(String s)->{
            System.out.println(s);
            StringBuffer reverse = new StringBuffer(s).reverse();
            System.out.println(reverse);
        });
    }
}
